package main

import "fmt"

//函数的闭包
func main() {
	f := func1()
	f()
	f()
	f()
}

func func1() func() {
	x := 100
	return func() {
		fmt.Println(x)
		x++
	}
}
